﻿@model TaoNiuOA.Models.LogOnModel
@{
    ViewBag.Title = "登录";
    Layout = "~/Views/Shared/_Layout.cshtml";

    var error = "";    
    if(!string.IsNullOrEmpty(Request.QueryString["error"]))
    {
        error = Request.QueryString["error"];
    }
}
<h2>
    登录OA
</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        @Html.Partial("_error")
        <div style=" text-align:center; color:Red; font-size:larger;">@error</div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
        @*        <div class="editor-label">
            @Html.LabelFor(model => model.RememberMe)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RememberMe)
            @Html.ValidationMessageFor(model => model.RememberMe)
        </div>*@
        <p>
            <input type="submit" value="登录" />
        </p>
    </fieldset>
}
